package org.example.jiaxiao.service.impl;

import org.example.jiaxiao.entity.Account;
import org.example.jiaxiao.mapper.UserMapper;
import org.example.jiaxiao.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public Account login(String username, String password, String userType) {
        // 根据用户名、密码和用户类型查询账户
        return userMapper.selectByUsernameAndPassword(username, password, userType);
    }
} 